<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>AHP Vendor Search</title>
</head>
<body bgcolor="98AFC7">
<script type="text/javascript" language="javascript" src="filter.js"></script>
<script type="text/javascript">
	function isProductNotSelected(){
		return false;
	}
	function departmentChanged(){
		if(document.getElementById("department").selectedIndex > 0){
			var listIndex = document.getElementById("department").selectedIndex;
			document.getElementById("product").disabled=false;
			filterDropDown(listIndex, document.SearchForm.product,1);
			
		}else{
			document.getElementById("product").selectedIndex=0;
			document.getElementById("product").disabled=true;
			document.getElementById("category").selectedIndex=0;
			document.getElementById("category").disabled=true;
			document.getElementById("brand").selectedIndex=0;
			document.getElementById("brand").disabled=true;
			document.getElementById("SearchButton").disabled=true;
		}
	}
	function productChanged(){
		if(document.getElementById("product").selectedIndex > 0){
			document.getElementById("category").disabled=false;
		}else{
			document.getElementById("category").selectedIndex=0;
			document.getElementById("category").disabled=true;
			document.getElementById("brand").selectedIndex=0;
			document.getElementById("brand").disabled=true;
			document.getElementById("SearchButton").disabled=true;
		}
	}
	function categoryChanged(){
		if(document.getElementById("category").selectedIndex > 0){
			document.getElementById("brand").disabled=false;
		}else{
			document.getElementById("brand").selectedIndex=0;
			document.getElementById("brand").disabled=true;
			document.getElementById("SearchButton").disabled=true;
		}
	}
	function brandChanged(){
		if(document.getElementById("category").selectedIndex > 0){
			document.getElementById("SearchButton").disabled=false;
		}else{
			document.getElementById("SearchButton").disabled=true;
		}
	}
</script>
<table width="100%" height="100%" bgcolor="98AFC7" style="color: blue;">
	<tr>
		<td height="5%">
			<table align="center">
				<tr>
					<td align="center">
						<h1>AHP VENDOR SEARCH</h1>
					</td>
				</tr>
			</table>
		</td>
		<td height="5%">
			<table align="right">
				<tr>
					<td align="right">
						<input type="submit" value="Logout" onclick="location.href ='login.html'"/>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td height="20%">
		<form id = SearchForm name='SearchForm' method=post action = 'SearchVendorServlet'>
			<table align="right" width="100%" height="100%" cellpadding="10">
				<tr>
					<td>
						Department: 
						<select name="department" onchange="departmentChanged()">
							<option selected="selected">Please Select...</option>
							<option value="61">61(Baby wear)</option>
							<option value="62">62(Children)</option>
							<option value="63">63(Adults/Ladies)</option>
							<option value="64">64(Adults/ Mens)</option>
							<option value="67">67(Inner Wear)</option>
						</select>
					</td>
					<td>
						Product:
						<select id="product"  name="product" disabled="disabled" onchange="productChanged()">
							<option selected="selected" >Select Product...</option>
						</select>
					</td>
					<td>
						Category: 
						<select name="category" disabled="disabled" onchange="categoryChanged()">
							<option selected="selected">Select Category...</option>
							<option value="1">Knit</option>
							<option value="2">Woven</option>
							<option value="3">Both</option>
						</select>
					</td>
					<td>
						Brand: 
						<select name="brand" disabled="disabled" onchange="brandChanged()">
							<option selected="selected">Select Brand...</option>
							<option value="1">Tex Basic</option>
							<option value="2">Tex Collection</option>
							<option value="3">Promotion/Sales</option>
							<option value="4">Disney</option>
							<option value="5">Marvel</option>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="1" align="right">
						<input type="button" value="Add New Vendor" onclick="parent.location='addVendor.html'"/>
					</td>
					<td colspan="3" align="right">
						<input id="SearchButton" name="SearchButton" type="submit" value="Search" disabled="disabled"/>
					</td>
				</tr>
					
			</table></form>
		
		</td>
	</tr>
	<tr>
		<td height="75%">&nbsp;</td>
	</tr>
</table>
</body>
</html>